package xyz.wanwanwan.www.hrm;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;

@Document(indexName = "hrm",type = "course")
@Data
public class CourseDoc {
    @Id
    private Long id;
    //课程名
    @Field(type = FieldType.Keyword)
    private String name;
    /**
     * 适用人群
     */
    private String forUser;
    //课程等级
    private String gradeName;

    /**
     * 课程等级
     */
    private Long gradeId;
    /**
     * 课程状态，下线：0 ， 上线：1
     */
    private Integer status;
    /**
     * 教育机构
     */
    private Long tenantId;
    @Field(type = FieldType.Keyword)
    private String tenantName;
    /**
     * 课程的开课时间
     */
    private Date startTime;
    /**
     * 课程的节课时间
     */
    private Date endTime;
    /**
     * 封面
     */
    private String pic;

    private String sortField;
    private String sortType;

    private Integer saleCount;
    private Integer viewCount;
    /**
     * 评论数
     */
    private Integer commentCount;

    /**
     * 简介
     */
    @Field(type = FieldType.Keyword)
    private String description;

    /**
     * 价格
     */
    private Float price;
    /**
     * 原价
     */
    private Float priceOld;
    @Field(type = FieldType.Text,analyzer = "ik_max_word",searchAnalyzer = "ik_max_word")
    private String myField;
    private Date onlineTime;
    private Long courseTypeId;
}
